package main

import "fmt"

type Car struct {
	Color string
	Brand string
	Model string
}

func ChangeColor(car *Car) {
	// car.Color 即 (*car).Color
	car.Color = "red"
	fmt.Println(car.Color)
}

func main() {
	var car *Car
	// fmt.Printf("%+v", car)
	car = &Car{
		Color: "yellow",
		Brand: "ford",
		Model: "yema",
	}
	// fmt.Printf("%+v\n", car)
	ChangeColor(car)
	fmt.Println(car.Color)

	car2 := new(Car)
	fmt.Printf("%v", car2)
}
